package cn.iocoder.yudao.module.reading.controller.app.assignment.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 未完成作业 Response VO
 *
 * @author 芋道源码
 */
@Schema(description = "用户 APP - 未完成作业 Response VO")
@Data
public class IncompleteAssignmentRespVO {

    @Schema(description = "作业ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long assignmentId;

    @Schema(description = "作业标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "第一周阅读作业")
    private String title;

    @Schema(description = "作业描述", example = "请完成指定绘本的阅读")
    private String description;

    @Schema(description = "作业日期", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime assignmentDate;

    @Schema(description = "要求类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "reading")
    private String requirementType;

    @Schema(description = "总绘本数", requiredMode = Schema.RequiredMode.REQUIRED, example = "3")
    private Integer totalBooks;

    @Schema(description = "已完成绘本数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer completedBooks;

    @Schema(description = "完成进度百分比", requiredMode = Schema.RequiredMode.REQUIRED, example = "33.33")
    private Double progressPercentage;

    @Schema(description = "剩余天数", example = "5")
    private Integer remainingDays;

    @Schema(description = "是否逾期", requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
    private Boolean isOverdue;

    @Schema(description = "班级信息")
    private ClassInfo classInfo;

    @Schema(description = "未完成的绘本列表")
    private List<IncompleteBook> incompleteBooks;

    @Data
    @Schema(description = "班级信息")
    public static class ClassInfo {
        @Schema(description = "班级ID", example = "1")
        private Long classId;

        @Schema(description = "班级名称", example = "一年级1班")
        private String className;
    }

    @Data
    @Schema(description = "未完成的绘本")
    public static class IncompleteBook {
        @Schema(description = "绘本ID", example = "1")
        private Long bookId;

        @Schema(description = "绘本标题", example = "小红帽")
        private String title;

        @Schema(description = "绘本封面", example = "https://example.com/cover.jpg")
        private String cover;

        @Schema(description = "是否已开始", example = "true")
        private Boolean isStarted;
    }
}
